Graphics system register data generation

ABSTRACT

A method, graphics system API and digital video system that provide more efficient processor usage and easier application programming. Register data for the hardware can be generated and written to the hardware control registers, recorded as a command list and recalled as a command list. Use of the command lists prevents repetitive calculation of register data and, hence, reduces processor usage and makes application programming easier.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates generally to graphics system register datageneration and, more particularly, to register data generation usingrecorded command lists of register data.

2. Related Art

Digital electronics and, in particular, digital video systems arebecoming ubiquitous in today's electronic world. One industry, amongmany, in which digital video systems are becoming much more prevalent istelevision services. For instance, practically every television systemnow offers digital service, which requires a set top box having adigital video system. In this setting, the digital video system providesvarious functions relative to the digital television services such astelevision programming information, games, Internet browsing and othermultimedia in a graphical format on a television display. Each digitalvideo system generally includes a processor, memory, a hardware graphicssystem for generating graphics, an application that provides systemfunctionality including graphics creation, and an application programinterface (API) for communicating between the application and graphicssystem. In operation, the digital video system application provides arequest for generation of a graphic to the graphics system API, and thegraphics system API would then generate register data for the graphicssystem using the digital video system processor.

An overriding problem with digital video systems is that the graphicssystem's hardware is very complex and unique for each manufacturer. Thiscreates a couple of issues. One issue relative to implementation is thateach time a graphic is requested by an application, the API must havethe register data calculated by the processor. When a graphic is usedrepeatedly, the processing is repeated, which creates very inefficientusage of system processor capacity. This is especially disadvantageouswhere the digital video system application provides a variety offunctions and each function must use the processor. For instance, aprocessor in an electronic gaming device may calculate graphics, andalso a myriad of other gaming calculations. In this regard, any devicethat can reduce processor utilization is advantageous.

Another issue relates to programming of the application and theapplication's ability to interact with the API and graphics system.Since graphic systems are very complex, application programmers mustdesign applications that include in-depth knowledge of the complexgraphics system hardware. As a simplified example, a graphics system mayrequire the following registers be filled in order to build a graphic:hardware dependent defaults, logic checking (e.g., raster operation),error checking, bit address calculation (e.g., a function that takes x,y, stride, format and calculates an address), shift to proper location,monochrome (e.g., for setting up register for special raster operation),and where to load values into registers. As a result, the applicationprogrammer must have a very in-depth knowledge of the required registerdata for the graphics system and must impart that knowledge into theapplication, or use predefined APIs that may be very generic andinefficient for a particular use.

In order to personally achieve this knowledge, application programmersspend an immense amount of time either learning register structure of agraphics systems and/or communicating with hardware manufacturers on howto calculate the correct register data. This problem is magnified forprogrammers where different graphics systems are used. The process ofprogramming a robust application, therefore, can become very timeconsuming and tedious.

One partial remedy to the above issues has been to provide graphictemplates or primitives that can be recalled and modified. However,current digital video systems require such a large number of graphics tobe generated on the fly that even a large library of graphics templatesis inadequate. Maintaining an updated graphics template library is alsoburdensome and inefficient.

In view of the foregoing, there is a need in the art for a graphicssystem API and related application that can generate graphics systemregister data, record register data and recall register data on the flyto increase digital video system efficiency and simplify applicationprogramming.

SUMMARY OF THE INVENTION

A first aspect of the invention is directed to a method of generatingregister data for registers of a graphics system, the method comprising:at least one of the steps of: generating register data based on arequest and writing the register data to the registers of the graphicssystem for execution; recording a command list of register data inmemory as the register data is generated; and recalling a recordedcommand list of register data and submitting the command list to thegraphics system for execution.

A second aspect of the invention includes an application programinterface for generating register data for a graphics system based on arequest, the interface comprising: a generate module that generatesregister data and writes the register data to the graphics system forexecution; a command list module including: a record module that recordsregister data generated by the generate module as a command list inmemory; a recall module that recalls a command list from memory andsubmits the command list to the graphics system for execution; and acontroller that determines which of at least one of the generate module,the record module and the recall module will be utilized to respond tothe request.

A third aspect of the invention is directed to a digital video systemcomprising: a processor; a memory; a graphics system for generatinggraphics; an application resident in memory; an application programinterface for the graphics system including: means for generatingregister data and writing the register data to the graphics system;means for recording in memory register data created by the means forgenerating as a command list of register data; means for recalling arecorded command list from memory and submitting the command list to thegraphics system; and means for selectively controlling which of themeans for directly writing, the means for recording and the means forrecalling are utilized in generating the register data.

The foregoing and other features and advantages of the invention will beapparent from the following more particular description of embodimentsof the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The embodiments of this invention will be described in detail, withreference to the following figures, wherein like designations denotelike elements, and wherein:

FIG. 1 shows a block diagram of a digital video system 10.

DETAILED DESCRIPTION OF THE INVENTION

For convenience purposes only, the following subtitles have beenprovided:

I. Digital Video System Overview

II. Graphics System

III. Application Program Interface

IV. Application

V. Method

I. Digital Video System Overview

FIG. 1 is a block diagram of a digital video system 10. Digital videosystem 10 includes a memory 12, a processor (CPU) 14, input/outputdevices (I/O) 16 and a bus 18. A database 20 may also be provided forstorage of data relative to processing tasks. Memory 12 includes aprogram product 22 that, when executed by CPU 14 comprises variousfunctional capabilities of system 10. Memory 12 (and database 20) maycomprise any known type of data storage system and/or transmissionmedia, including magnetic media, optical media, random access memory(RAM), read only memory (ROM), a data object, etc. Moreover, memory 12(and database 20) may reside at a single physical location comprisingone or more types of data storage, or be distributed across a pluralityof physical systems.

Processor 14 may likewise comprise a single processing unit, or aplurality of processing units distributed across one or more locations.In one embodiment, digital video system 10 is a set top box configuredto provide various digital television service functionality includinggenerating graphics for overlay in a television display. In thissetting, processor 14 may comprise an IBM PowerPC® CPU. Processor 14 isdesigned to drive the operation of the particular hardware and iscompatible with other system components and I/O controllers. I/O 16 maycomprise any known type of input/output device including a networksystem, modem, keyboard, mouse, scanner, voice recognition system, CRT,printer, disc drives, cable system, etc.

Program product 22 may include an application 24 that provides thevarious functional capabilities of digital video system 10. In oneembodiment, application 24 includes a graphics requester 26, which willbe described in greater detail below.

Digital video system 10 also includes a graphics system 30 that includesa graphics engine 32, a scaler 34 and a command list processor 36. Anapplication program interface (API) 40 is provided for communicationbetween application 24 and graphics system 30. API 40 includes acontroller 42, a generate module 44 and a command list module 46.Command list module 46 may include a record module 48 and a recallmodule 50. Additional components 52, such as cache memory, communicationsystems, digital-analog encoder, etc., may also be incorporated intosystem 10.

The above delineated components of digital video system 10 enable anapplication 24 to request construction of a graphic using API 40 andgraphics system 30. As will be described in more detail below, API 40provides the ability to do at least one of: 1) generate register databased on a request from application 24 and write the register data toregisters of graphics system 30 for execution; 2) record a command listof register data in memory 20 as the register data is generated; and 3)recall a recorded command list of register data and submit the commandlist to graphics system 30 for execution. A “command list,” as usedherein, is a list of register data. “Register data,” as used herein, isan address/data pair where each address/data pair specifies theappropriate graphics system component (i.e., graphics engine, scaler orcommand list processor) device control register address and a data valueto be written to that register address. In one embodiment, command listsare created for frequently used graphic features. For example, registerdata for constructing a rectangle may be used frequently enough tosubstantiate recording as a command list.

II. Graphics System

As noted above, graphics system 30 includes a graphics engine 32, ascaler 34 and a command list processor 36. Graphics engine 32 ishardware that performs graphics processing tasks based on requests fromapplication 24. Scaler 34 is hardware that performs enlargement orreduction of graphics based on requests from application 24. Commandlist processor 36 is hardware that performs distribution of a commandlist into graphics engine 32 and/or scaler 34 based on instructions fromAPI 40 without processor 14 intervention.

III. Application Program Interface

As indicated above, application program interface (API) 40 is providedfor communication between application 24 and graphics system 30. API 40provides the ability to do at least one of: 1) generate register databased on a request from application 24 and write the register data toregisters of graphics system 30 for execution; 2) record a command listof register data in memory 20 as the register data is generated; and 3)recall a recorded command list of register data and submit the commandlist to graphics system 30 for execution.

In order to accomplish the above tasks, API 40 includes a controller 42,a generate/write module 44 and a command list module 46. Controller 42receives graphics construction requests from application 24 andimplements appropriate modules, i.e., generate module 44 and/or commandlist module 46.

Controller 42 of API 40 determines which of the above three functionsthe application wants to perform. The determination of which tasks areto be implemented can occur in a couple of ways. In one embodiment, thedetermination can be made by a particular indicator being sent fromapplication 24, i.e., application 24 determines which tasks will providethe most efficient implementation. For instance, if application 24requires register data to be generated and written to graphics system30, a ‘direct write indicator’ may be sent with the request. Ifapplication 24 wants to record register data as it is generated as acommand list for later use, a ‘record indicator’ may be sent with therequest. If application 24 wants to recall a command list, a ‘recallindicator’ may be sent with the request. The above-described indicatorsmay be used alone or in combination within a request for a graphic. In asecond embodiment, controller 42 may simply receive the request anddetermine which tasks should be used to efficiently construct thegraphic. This may be accomplished in a variety of ways. For instance, aparticular graphic may be constructed a number of times after which acommand list is created for later use, or a particular graphic may beknown to be used frequently such that a command list is recordedearlier. In another example, defaults may be preset to determine whichtasks to conduct.

When it is determined that register data needs to be generated,generate/write module 44 is implemented by controller 42 to calculateregister data, i.e., address/data pairs, necessary for graphics systemto construct the graphic. The calculations are made by API 40 accessingprocessor 14. In order to calculate the register data, generate module44 accesses processor 14 to perform the calculations in real time.Generate/write module 44 also may be instructed to write the registerdata to graphics system 30, e.g., by a ‘direct write indicator’. In thiscase, generate/write module 44 writes the generated register data toappropriate graphics system components, i.e., graphics engine 32 and/orscaler 34. Graphics system 30 would then execute the register datawritten thereto to construct the graphic.

When it is determined that register data should be recorded as a commandlist for later use, controller 42 implements command list module 46 and,in particular, record module 48 to record the register data as a commandlist. In this setting, generate/write module 44 generates the registerdata, but does not write it to the appropriate registers of graphicssystem 30. Rather, record module 48 allocates memory, e.g., in database20, for register data (i.e., command list) and sets a command listmemory variable to the starting address of the allocated memory. As theregister data is generated, the command list memory variable isincremented for the next address/data pair and the process repeats foreach address/data pair required for the graphic. A list of recordedcommand lists is also maintained for access by application 24 and/or API40. Each command list includes sufficient register data, i.e.,address/data pairs, to create a particular graphic.

When it is determined that a command list should be recalled, API 40points command list module 46 and, in particular, recall module 50 tothe memory location of a recorded command list. Recall module 50 thenaccesses recorded command list storage 25 to recall a requested commandlist. Command list module 46 then passes the command list to commandlist processor 36 of graphics system 30 for distribution of the registerdata, i.e., address/data pairs, in the command list to the appropriategraphics engine 32 and/or scaler 34 registers. Command list processor 36can then execute on the register data in hardware logic of graphicssystem 30, i.e., using graphics engine 32 and/or scaler 34, to constructthe requested graphic. Compared to direct generation and writing ofregister data, implementation of a command list is processor 14independent because register data does not have to be calculated by theprocessor. As a result, processor 14 is free to execute other tasks.Command list processor 36 also provides pacing control of graphicsengine 32 and scaler 34, and supports animation without processor 14intervention.

Use of API 40 allows for construction of a graphic to be implemented ina much more efficient manner. In particular, whenever a command list canbe utilized, API 40 provides a mechanism to construct a graphic withoutrepeatedly calculating register data. For instance, a sample API mayonly need to know the following parameters: fill color, format ofdestination (RGB32 or 16, YCBCR, etc.), pointer to base address,destination x, destination y, destination stride, destination width, anddestination height. With these parameters, API 40 can call anappropriate command list and application 24 can adjust the aboveparameters in the command list to create a unique graphic or reuse agraphic.

Each graphic may be constructed using a variety of generated registerdata and recalled command list(s). This functionality greatly increasesthe speed and efficiency at which graphics can be constructed. Inaddition, command list(s) can also be recalled and then modified usinggenerate/write module 42 prior to submission to command list processor36, which provides even more latitude in graphic design. Furthermore,combination of command lists can be accommodated such that complexoperations can be constructed easily by combining multiple commandlists.

It should be recognized that although API 40 is illustrated as beingseparate from graphics system 30 and available to application 24, API 40may be an internal component of the graphics system. Requests forcommand list(s) would be generated by graphics system 30 and/orapplication 24. Similarly, modification and combining of command listswould be conducted by graphics system 30.

IV. Application

The invention also includes application 24 that is capable of requestingconstruction of a graphic. As described above, application 24 accessesgraphics system 30 using API 40. A graphics requester 26 is included aspart of application 24 and can request API 40 to conduct at least one ofthe above described tasks. That is, 1) generate register data forgraphics system 30 (using generate module 44) and write the registerdata to the graphics system; 2) record register data as a command listas the register data is generated (using command list module 46 andrecord module 48); and 3) recall a recorded command list of registerdata (using command list module 46 and record module 50) and submit itto graphics system 30 (command list processor 36). Graphics requestor 26is also capable of selecting from the list of recorded command lists,i.e., from recorded command list storage 25, where use of a command listis possible.

In addition to providing more efficient graphics construction,application 24 and API 40 are also helpful relative to applicationprogramming. In particular, application 24 and API 40 can be provided toapplication programmers with prerecorded command lists. Hence, API 40provides all of the functionality of graphics engine 32 and scaler 34 toapplications without requiring a programmer to have in-depth knowledgeof the graphics system hardware. As a result, a less knowledgeableprogrammer may be able to program application 24 knowing that particularrecorded command lists are available to the application. For example, aprogrammer may be able to recall a recorded command list, present thecommand list to the command list processor 36 to display the initialgraphic, modify a single command list line to change a parameter, e.g.,an X-Y coordinate, of the graphic and present the modified command listto processor 36 to move the graphic on the display. This process couldthen be re-used, perhaps in a simple loop to perform an animation.

V. Method

The invention also includes a method of generating register data forregisters of a graphics system, the method comprising: at least one ofthe steps of: generating register data based on a request and writingthe register data to the registers of the graphics system for execution;recording a command list of register data in memory as the register datais generated; and recalling a recorded command list of register data andsubmitting the command list to the graphics system for execution. Thestep of generating may be conducted using processor 14, and the steps ofrecording and recalling may be conducted using hardware logic, asdescribed above. The method may also include the step of modifying therecorded command list prior to the step of submitting. Further, the stepof recalling may include recalling a plurality of command lists andsubmitting the plurality of command lists to the graphics system forexecution. The method may further comprise the step of receiving anindicator from an application indicating which of the at least one stepsto conduct. Also, the method may include the step of determining whichsteps to conduct using API 40 of graphics system 30.

In the previous discussion, it will be understood that the method stepsdiscussed are performed by a processor, such as CPU 14 of system 10, orhardware logic, such as graphics engine 32, executing instructions ofprogram product 22 or API 40 stored in memory. It is understood that thevarious devices, modules, mechanisms and systems described herein may berealized in hardware, software, or a combination of hardware andsoftware, and may be compartmentalized other than as shown. They may beimplemented by any type of computer system or other apparatus adaptedfor carrying out the methods described herein. A typical combination ofhardware and software could be a general-purpose computer system with acomputer program that, when loaded and executed, controls the computersystem such that it carries out the methods described herein.Alternatively, a specific use computer, containing specialized hardwarefor carrying out one or more of the functional tasks of the inventioncould be utilized. Hardware described above may also be provided asseparate entities accessible to system 10. The present invention canalso be embedded in a computer program product, which comprises all thefeatures enabling the implementation of the methods and functionsdescribed herein, and which—when loaded in a computer system—is able tocarry out these methods and functions. Computer program, softwareprogram, program, program product, or software, in the present contextmean any expression, in any language, code or notation, of a set ofinstructions intended to cause a system having an information processingcapability to perform a particular function either directly or after thefollowing: (a) conversion to another language, code or notation; and/or(b) reproduction in a different material form.

It should also be recognized that the particular modules disclosed canbe further compartmentalized or provided as separate APIs. In addition,while the invention has been disclosed relative to a digital videosystem and a graphics system, the teachings of the invention areapplicable to any system and hardware.

While this invention has been described in conjunction with the specificembodiments outlined above, it is evident that many alternatives,modifications and variations will be apparent to those skilled in theart. Accordingly, the embodiments of the invention as set forth aboveare intended to be illustrative, not limiting. Various changes may bemade without departing from the spirit and scope of the invention asdefined in the following claims.

1. A method of generating register data for registers of a graphicssystem, the method comprising: at least one of the steps of: generatingregister data based on a request and writing the register data to theregisters of the graphics system for execution; recording a command listof register data in memory as the register data is generated; andrecalling a recorded command list of register data and submitting thecommand list to the graphics system for execution.
 2. The method ofclaim 1, wherein the step of generating is conducted using a processor,and the steps of recording and recalling is conducted using hardwarelogic.
 3. The method of claim 1, further comprising the step ofmodifying the recorded command list prior to the step of submitting. 4.The method of claim 1, wherein the step of recalling includes recallinga plurality of command lists and submitting the plurality of commandlists to the graphics system for execution.
 5. The method of claim 1,further comprising the step of receiving an indicator from anapplication indicating which of the at least one steps to conduct. 6.The method of claim 1, further comprising the step of determining whichsteps to conduct using an application program interface of the graphicssystem.
 7. An application program interface for generating register datafor a graphics system based on a request, the interface comprising: agenerate module that generates register data and writes the registerdata to the graphics system for execution; a command list moduleincluding: a record module that records register data generated by thegenerate module as a command list in memory; a recall module thatrecalls a command list from memory and submits the command list to thegraphics system for execution; and a controller that determines which ofat least one of the generate module, the record module and the recallmodule will be utilized to respond to the request.
 8. The interface ofclaim 7, wherein the graphics system includes a graphics engine, ascaler and a command list processor.
 9. The interface of claim 8,wherein the command list processor distributes register data to at leastone of the graphics engine and the scaler.
 10. The interface of claim 7,wherein the generate module utilizes a processor to generate theregister data, and the command list module utilizes hardware logic. 11.The interface of claim 7, wherein the generate module is configured tomodify the command list prior to submitting the command list to thegraphics system.
 12. The interface of claim 7, wherein the recall modulerecalls a plurality of command lists and submits the plurality ofcommand lists to the graphics system for execution.
 13. The interface ofclaim 12, wherein the generate module is configured to modify theplurality of command lists prior to submission to the graphics system.14. The interface of claim 7, wherein the controller determines whichmodule to utilize based on an indicator from an application.
 15. Adigital video system comprising: a processor; a memory; a graphicssystem for generating graphics; an application resident in memory; anapplication program interface for the graphics system including: meansfor generating register data and writing the register data to thegraphics system; means for recording in memory register data created bythe means for generating as a command list of register data; means forrecalling a recorded command list from memory and submitting the commandlist to the graphics system; and means for selectively controlling whichof the means for directly writing, the means for recording and the meansfor recalling are utilized in generating the register data.
 16. Thesystem of claim 15, wherein the graphics system includes a graphicsengine, a scaler and a command list processor.
 17. The system of claim16, wherein the command list processor distributes register data to atleast one of the graphics engine and the scaler.
 18. The system of claim15, wherein the means for generating modifes the command list prior tothe means for recalling submitting the command list to the graphicssystem.
 19. The system of claim 15, wherein the means for recallingrecalls a plurality of command lists and submits the plurality ofcommand lists to the graphics system for execution.
 20. The system ofclaim 19, wherein the means for generating modifies the plurality ofcommand lists prior to submission to the graphics system.